package com.tianyang.yukuaifu.jump.shareutil.share;


import com.tianyang.yukuaifu.jump.shareutil.ShareLogger;

/**
 * Created by 薛勇军 on 2018/6/12.
 */

public abstract class ShareListener implements IUiListener {
    @Override
    public final void onComplete(Object o) {
        shareSuccess();
    }

    @Override
    public final void onError(UiError uiError) {
        shareFailure(
                new Exception(uiError == null ? ShareLogger.INFO.DEFAULT_QQ_SHARE_ERROR : uiError.errorDetail));
    }

    @Override
    public final void onCancel() {
        shareCancel();
    }

    public abstract void shareSuccess();

    public abstract void shareFailure(Exception e);

    public abstract void shareCancel();

    // 用于缓解用户焦虑
    public void shareRequest() {
    }
}
